<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
    <head>
        <title>SecureMail: Spring Security</title>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <link rel="icon" type="image/x-icon" href="/assets/img/favicon.ico" th:href="@{/assets/img/favicon.ico}"/>
        <link rel="stylesheet" href="/webjars/bootstrap/css/bootstrap.css" th:href="@{/webjars/bootstrap/css/bootstrap.css}" />
        <link rel="stylesheet" href="/assets/css/custom.css" th:href="@{/assets/css/custom.css}"/>
    </head>
    <body>
        <div th:replace="templates::header"></div>
        <div class="container">
            <h1>Message</h1>
            <br />
            <div class="message-view">
                <div class="row">
                    <div class="col-sm-1 message-label">To:</div>
                    <div class="col-sm-4" th:text="${message.toId}"></div>
                </div>
                <div class="row">
                    <div class="col-sm-1 message-label">From:</div>
                    <div class="col-sm-4" th:text="${message.fromId}"></div>
                </div>
                <div class="row">
                    <div class="col-sm-1 message-label">Subject:</div>
                    <div class="col-sm-5" th:text="${message.summary}"></div>
                </div>
                <div class="row">
                    <div class="col-sm-1 message-label">Message:</div>
                    <div class="col-sm-7" th:text="${message.text}"></div>
                </div>
                <div class="row">
                    <div class="col-sm-1 message-label">Created:</div>
                    <div class="col-sm-3"th:text="${#calendars.format(message.created, 'dd/MMM/yyyy hh:mm a')}"></div>
                </div>
                <div class="row">
                    <div class="col-sm-offset-1 col-sm-3">
                        <a class="btn btn-primary" href="/messages/inbox" th:href="@{/messages/inbox}">Done</a>
                    </div>
                </div>
            </div>
        </div>
        <div th:replace="templates::footer"></div>
        <script src="/webjars/jquery/jquery.min.js" th:src="@{/webjars/jquery/jquery.min.js}"></script>
        <script src="/webjars/bootstrap/js/bootstrap.min.js" th:src="@{/webjars/bootstrap/js/bootstrap.min.js}"></script>
    </body>
</html>
